package com.ymatou.iapi.sellerquery.testcase;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.trading.sellerquery2.parameter.resp.GetSellerSalesAmountResponse;
import com.ymatou.query.seller.trading.api.parameter.Common;
import com.ymatou.query.seller.trading.api.parameter.GetSellerSalesAmountArguments;
import com.ymatou.query.seller.trading.api.parameter.GetSellerSalesAmountBean;
import com.ymatou.query.seller.trading.api.parameter.Sp_GetSellerSalesAmount;
import com.ymatou.query.seller.trading.api.parameter.TimeRange;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymt.utils.tag.P3;
import com.ymttest.common.enums.DateTypeEnum;
import com.ymttest.common.enums.OrderStatusEnum;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.constant.ECode;

/**
 * 查询买手销售额 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_GetSellerSalesAmount {

	private static GetSellerSalesAmountBean getsellersalesamountbean;
	private static com.ymatou.query.seller.trading.api.service.GetSellerSalesAmountCall getsellersalesamountcall;
//	private static com.ymatou.iapi.trading.sellerquery.service.GetSellerSalesAmountCall getsellersalesamountcall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("查询买手销售额");
	}

	@Before 
	public void caseUp() {
		getsellersalesamountbean = new GetSellerSalesAmountBean();
		getsellersalesamountcall = new com.ymatou.query.seller.trading.api.service.GetSellerSalesAmountCall();
//		getsellersalesamountcall = new com.ymatou.iapi.trading.sellerquery.service.GetSellerSalesAmountCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getsellersalesamountcall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	
	private void verify(){
		GetSellerSalesAmountResponse expectedResponse = new GetSellerSalesAmountResponse();
		ConstructExpectedResponse(expectedResponse);
		GetSellerSalesAmountResponse actualResponse = getsellersalesamountcall.getSellerSalesAmountResponse();
		DataUtil.verifyEquals(expectedResponse.getSellerSalesAmountDic().size(), actualResponse.getSellerSalesAmountDic().size(), "验证SellerSalesAmountDic的大小");
		Iterator<Integer> keys = actualResponse.getSellerSalesAmountDic().keySet().iterator();
		while(keys.hasNext()){
			Integer dateType = keys.next();
			DataUtil.verifyDecimalEquals(expectedResponse.getSellerSalesAmountDic().get(dateType), actualResponse.getSellerSalesAmountDic().get(dateType), "验证SellerSalesAmountDic."+dateType.toString());
		}
	}

	private void ConstructExpectedResponse(GetSellerSalesAmountResponse response) {
		GetSellerSalesAmountArguments args = GetArguments();
		Map<Integer, BigDecimal> sellerSalesAmountDic = Execute(args);
		response.setSellerSalesAmountDic(sellerSalesAmountDic);
	}

	private GetSellerSalesAmountArguments GetArguments() {
		GetSellerSalesAmountArguments args = new GetSellerSalesAmountArguments();
		args.setSellerId(getsellersalesamountbean.getSellerId());
		args.setOrderSellerAcceptedStatus(OrderStatusEnum.SellerAccept
				.getValue());
		SetPaidInFullAndStatus(args);
		SetTimeRange(args);
		return args;
	}

	private void SetPaidInFullAndStatus(GetSellerSalesAmountArguments args) {
		args.setOrderStatus(Common.GetSellerOrderStatus(
				getsellersalesamountbean.getOrderStatusList(), true));
		args.setPaidInFull(Common.paidInFull);
	}

	private void SetTimeRange(GetSellerSalesAmountArguments args) {
		if (DataUtil.isNullOrEmpty(getsellersalesamountbean.getDateTypeList())) {
			args.setNeedAll(true);
			return;
		}
		Map<DateTypeEnum, TimeRange> durations = new HashMap<DateTypeEnum, TimeRange>();
//		for (DateTypeEnum dt : getsellersalesamountbean.getDateTypeList()) {
//			TimeRange duration = Common.ToTimeRange(DateTypeEnum.valueOf(
//					dt.toString()).getValue());
//			durations.put(dt, duration);
//		}
		for (int dt : getsellersalesamountbean.getDateTypeList()) {
			TimeRange duration = Common.ToTimeRange(dt);
			durations.put(DateTypeEnum.forValue(dt), duration);
		}
		if(durations.containsKey(DateTypeEnum.All)){
			args.setNeedAll(true);
		}
		args.setThisYear(durations.get(DateTypeEnum.ThisYear));
		args.setThisQuarter(durations.get(DateTypeEnum.ThisQuarter));
		args.setThisMonth(durations.get(DateTypeEnum.ThisMonth));
		args.setThisWeek(durations.get(DateTypeEnum.ThisWeek));
		args.setToday(durations.get(DateTypeEnum.Today));
		args.setYesterday(durations.get(DateTypeEnum.Yesterday));
	}

	private Map<Integer, BigDecimal> Execute(GetSellerSalesAmountArguments args) {
		Sp_GetSellerSalesAmount sp = new Sp_GetSellerSalesAmount();
		sp.setSellerId(args.getSellerId());
		sp.setPaidInFull(args.getPaidInFull());
		sp.setOrderSellerAcceptedStatus(args.getOrderSellerAcceptedStatus());
		sp.setOrderStatus(args.getOrderStatus());
		sp.setAll(args.isNeedAll());
		sp.setYearBegin(GetTime(args.getThisYear(), true));
		sp.setYearEnd(GetTime(args.getThisYear(), false));
		sp.setQuarterBegin(GetTime(args.getThisQuarter(), true));
		sp.setQuarterEnd(GetTime(args.getThisQuarter(), false));
		sp.setMonthBegin(GetTime(args.getThisMonth(), true));
		sp.setMonthEnd(GetTime(args.getThisMonth(), false));
		sp.setWeekBegin(GetTime(args.getThisWeek(), true));
		sp.setWeekEnd(GetTime(args.getThisWeek(), false));
		sp.setTodayBegin(GetTime(args.getToday(), true));
		sp.setTodayEnd(GetTime(args.getToday(), false));
		sp.setYesterdayBegin(GetTime(args.getYesterday(), true));
		sp.setYesterdayEnd(GetTime(args.getYesterday(), false));
		return sp.execute();
	}

	private String GetTime(TimeRange range, boolean begin) {
		return range == null ? null : (begin ? range.getBegin() : range
				.getEnd());
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_001() {
		Logger.start(true, "查询买手今年所有订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisYear);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(17);
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetSellerSalesAmount_002() {
		Logger.start(true, "查询买手所有待付款和已付款订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisWeek);
//			DateTypeList.add(DateTypeEnum.ThisQuarter);
//			DateTypeList.add(DateTypeEnum.ThisYear);
//			DateTypeList.add(DateTypeEnum.ThisMonth);
//			DateTypeList.add(DateTypeEnum.All);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisWeek.getValue());
			DateTypeList.add(DateTypeEnum.ThisQuarter.getValue());
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			DateTypeList.add(DateTypeEnum.ThisMonth.getValue());
			DateTypeList.add(DateTypeEnum.All.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(1);
			OrderStatusList.add(4);
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_003() {
		Logger.start(true, "买手用户id为空");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisWeek);
//			DateTypeList.add(DateTypeEnum.ThisQuarter);
//			DateTypeList.add(DateTypeEnum.ThisYear);
//			DateTypeList.add(DateTypeEnum.ThisMonth);
//			DateTypeList.add(DateTypeEnum.All);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisWeek.getValue());
			DateTypeList.add(DateTypeEnum.ThisQuarter.getValue());
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			DateTypeList.add(DateTypeEnum.ThisMonth.getValue());
			DateTypeList.add(DateTypeEnum.All.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(1);
			OrderStatusList.add(4);
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.ERROR400,
					getsellersalesamountcall.getCode(), "验证Code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_004() {
		Logger.start(true, "买手用户id不存在");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisWeek);
//			DateTypeList.add(DateTypeEnum.ThisQuarter);
//			DateTypeList.add(DateTypeEnum.ThisYear);
//			DateTypeList.add(DateTypeEnum.ThisMonth);
//			DateTypeList.add(DateTypeEnum.All);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisWeek.getValue());
			DateTypeList.add(DateTypeEnum.ThisQuarter.getValue());
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			DateTypeList.add(DateTypeEnum.ThisMonth.getValue());
			DateTypeList.add(DateTypeEnum.All.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(1);
			OrderStatusList.add(4);
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = 11;
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_005() {
		Logger.start(true, "查询本周确认收货订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisWeek);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisWeek.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.Received.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetSellerSalesAmount_006() {
		Logger.start(true, "查询本月订单确立状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisMonth);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisMonth.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_007() {
		Logger.start(true, "查询本季度已付款状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisQuarter);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisQuarter.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.AccountPaid.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_008() {
		Logger.start(true, "查询今年已发货状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisYear);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.Shipped.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_009() {
		Logger.start(true, "查询今年买家取消状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisYear);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.UserAcceptCancel.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_010() {
		Logger.start(true, "查询今年买手取消状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisYear);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.SellerAcceptCancel.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_011() {
		Logger.start(true, "查询今年系统自动取消状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisYear);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.SystemCancel.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_012() {
		Logger.start(true, "查询今年订单补款完成(等待发货)状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisYear);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisYear.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.SellerAccept.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_013() {
		Logger.start(true, "查询所有时间内已确认接单(等待发起补款)完成(等待发货)状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.All);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.All.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderPostPay.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerSalesAmount_014() {
		Logger.start(true, "查询本周所有状态的订单的销售额成功");
		try {
			// 参数
//			ArrayList<DateTypeEnum> DateTypeList = new ArrayList<DateTypeEnum>();
//			DateTypeList.add(DateTypeEnum.ThisWeek);
			ArrayList<Integer> DateTypeList = new ArrayList<Integer>();
			DateTypeList.add(DateTypeEnum.ThisWeek.getValue());
			getsellersalesamountbean.setDateTypeList(DateTypeList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			OrderStatusList.add(OrderStatusEnum.AccountPaid.getValue());
			OrderStatusList.add(OrderStatusEnum.Shipped.getValue());
			OrderStatusList.add(OrderStatusEnum.Received.getValue());
			OrderStatusList.add(OrderStatusEnum.SellerAccept.getValue());
			OrderStatusList.add(OrderStatusEnum.OrderPostPay.getValue());
			OrderStatusList.add(OrderStatusEnum.UserAcceptCancel.getValue());
			OrderStatusList.add(OrderStatusEnum.SellerAcceptCancel.getValue());
			OrderStatusList.add(OrderStatusEnum.SystemCancel.getValue());
			getsellersalesamountbean.setOrderStatusList(OrderStatusList);
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			getsellersalesamountbean.setSellerId(SellerId);
			// 发送请求
			getsellersalesamountcall.setData(getsellersalesamountbean);
			getsellersalesamountcall.callService();
//			Logger.comment("getsellersalesamountcall send:"
//					+ getsellersalesamountcall.getEntityString());
//			Logger.comment("getsellersalesamountcall response:"
//					+ getsellersalesamountcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getsellersalesamountcall.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}